namespace Dapper.Extensions;

internal static class Check
{
	public static T NotNull<T>(T? value, string parameterName)
	{
		if (value is null)
		{
			throw new ArgumentNullException(parameterName);
		}

		return value;
	}

	public static string NotEmpty(string? value, string parameterName)
	{
		if (string.IsNullOrWhiteSpace(value))
		{
			throw new ArgumentException($"{parameterName} cannot be null or empty.", parameterName);
		}
		return value;
	}
}
